// mircoApp/numberCollection/collectionUser/collectionUser.js
const app = getApp();
const skinBehavior = require("../../../utils/themeSkin/skinBehavior");
Page({
  behaviors: [skinBehavior],
  /**
   * 页面的初始数据
   */
  data: {
    info:{
    },
    navLists:[
      {
        titleClass:'icon-shuzicangpin',
        title:'藏品中心',
        rightClass:'icon-icon_more11',
        navTo:'/mircoApp/numberCollection/classify/classify'
      },
      {
        titleClass:'icon-wodecangpin',
        title:'我的藏品',
        rightClass:'icon-icon_more11',
        navTo:'/mircoApp/numberCollection/collectionList/collectionList'
      },
      {
        titleClass:'icon-zhuanzengmingxi',
        title:'转赠明细',
        rightClass:'icon-icon_more11',
        navTo:'/mircoApp/numberCollection/presentList/presentList'
      },
      {
        titleClass:'icon-duihuanmingxi',
        title:'兑换明细',
        rightClass:'icon-icon_more11',
        navTo:'/mircoApp/numberCollection/orderList/orderList'
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
    this.recordUser();
  },
  recordUser() { //会员信息
    let urlStr = app.getNetAddresss("plugin.collection-center.frontend.controllers.collection.member");
    app._postNetWork({
      url: urlStr,
      data: {},
      success: (resdata) => {
        var res = resdata.data;
        let data = res.data;
        if (res.result == 1) {
          this.setData({
            info:data.member
          })
        }
      },
      fail: function (res) {
        console.log(res);
      },
    });
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})